home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Bombardier_PC / BSCRIPTS.CST / 00105_Script_RobTour < prev    next >
Text File  |  1999-04-25  |  5KB  |  223 lines

  1. -- ⌐ 1998 @radical.media, inc. & Concurrent New Media Group, L.L.C.
  2. -- Developed for Bombardier, Inc.
  3. --
  4. -- All programming developed by: 
  5. -- Robert Fabricant, Valerie Valoueva, Ossi Shaked, 
  6. -- Henry Sauvageot, Chris Howell & Chris Girand
  7. --
  8. -- Use of this code by parties other than @radical.media, inc. or their
  9. --agents 
  10. -- without the express written consent of @radical.media, inc. AND Concurrent 
  11. -- New Media Group, L.L.C. is strictly prohibited.
  12. ------------------------------------------------------
  13. -------*This script is not used in this version of the movie*----------
  14.  
  15. property mySprite, NeutralName, RolloverName,  maxSlideSpeed, maxFlashSpeed,¼
  16.          AnimationIsOver,planeName
  17. global  slideSpeed,flashSpeed,memberCount,myFrame, startAnimation
  18.  
  19.  
  20. on new me
  21.   set startAnimation = FALSE
  22.   set AnimationIsOver = FALSE
  23.   set maxSlideSpeed = 0
  24.   set maxFlashSpeed = 2
  25.   set mySprite = the spriteNum of me
  26.   set NeutralName = getNeutralName(me, mySprite)
  27.   set RolloverName = NeutralName&"-rol"
  28.   set planeName = getPlaneName (me)
  29. end
  30.  
  31. on getPlaneName me
  32.   set Name = NeutralName
  33.   repeat with i =  the Number of Chars in Name down to 1
  34.     if char i of Name <> "_" then 
  35.       delete char i of Name
  36.     else
  37.       delete char i of Name
  38.       exit repeat
  39.     end if
  40.   end repeat
  41.   
  42.   return Name
  43.   
  44. end
  45.  
  46.  
  47. on mouseEnter me
  48.   if not AnimationIsOver then
  49.     set the member of sprite mySprite = member  RolloverName
  50.     --  set the member of sprite linkedSprite = member  linkedHiliteName
  51.   end if
  52.   
  53. end
  54.  
  55. on mouseLeave me
  56.   if not AnimationIsOver then
  57.     set the member of sprite mySprite = member  NeutralName
  58.     --  set the member of sprite linkedSprite = member  linkedNeutralName
  59.   end if
  60.   
  61. end
  62.  
  63. on mouseUp me
  64.   set startAnimation = TRUE
  65.   set memberCount = 0
  66.   set slideSpeed = 0
  67.   set flashSpeed = 0
  68.   --  sendAllSprites(#layoutPuppetsOff)
  69.   --  go to frame frameNameRoot&Index
  70. end
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77. on getNeutralName me,SpriteNum
  78.   
  79.   set aMember = the member of sprite spriteNum
  80.   set Name = the name of member aMember
  81.   if Name contains "-" then
  82.     repeat with i = the Number of Chars of Name down to 1
  83.       if char i of Name <> "-" then 
  84.         delete char i of Name
  85.       else
  86.         delete char i of Name
  87.         exit repeat
  88.       end if
  89.     end repeat
  90.   end if
  91.   
  92.   
  93.   return Name
  94.   
  95. end
  96.  
  97.  
  98. on exitFrame me
  99.   set myframe = the frame
  100.   put myframe
  101.   
  102.   if myframe <> label("iexterior") then
  103.     slideButton me
  104.   else
  105.     set startAnimation = TRUE
  106.     flashPlane me
  107.   end if
  108.   
  109.   
  110.   if AnimationIsOver then
  111.     --    set the member of sprite mySprite = memberCount&"-"&planeName
  112.     oldScript me
  113.     oldMouseUp me
  114.   end if
  115.   
  116.   
  117. end
  118.  
  119.  
  120. on doAnimation me
  121.   
  122.   if memberCount<=14 then
  123.     slideButton me
  124.   else
  125.     go to frame "iexterior"
  126.     --    flashPlane me
  127.   end if
  128.   if myFrame = label("iexterior") then
  129.     flashPlane me
  130.   end if
  131.   
  132.   
  133.   
  134.   
  135. end
  136.  
  137. on slideButton me
  138.   if startAnimation then
  139.     if slideSpeed >= maxSlideSpeed then
  140.       set the member of sprite mySprite = memberCount&"-"&planeName
  141.       set memberCount = memberCount+1
  142.       set slideSpeed = 0
  143.       if memberCount > 15 then 
  144.         go to frame "Iexterior"
  145.       end if
  146.     end if
  147.     set slideSpeed = slideSpeed+1
  148.   end if
  149.   
  150. end
  151.  
  152.  
  153. on flashPlane me
  154.   if startAnimation then
  155.     if flashSpeed >= maxFlashSpeed then
  156.       set the member of sprite mySprite = memberCount&"-"&planeName
  157.       set memberCount = memberCount+1
  158.       set flashSpeed = 0
  159.       
  160.       if memberCount > 19 then 
  161.         set startAnimation = FALSE
  162.         set AnimationIsOver = TRUE
  163.         --      set memberCount = 0
  164.         
  165.       end if
  166.       
  167.     end if
  168.     set flashSpeed = flashSpeed+1
  169.   end if
  170.   
  171. end
  172.  
  173.  
  174.  
  175.  
  176.  
  177. --on layoutPuppetsOff me
  178. --  puppetsprite mySprite, false
  179. --end
  180.  
  181. on oldScript me
  182.   global gFrame, menuController
  183.   set gFrame=the frame
  184.   sound stop(1)
  185.   sound stop(2)
  186.   --  updatestage
  187.   
  188.   
  189.   if the name of member the member of sprite mysprite contains "-rol" then
  190.     
  191.     puppetsound 3,"qtvrstrt"
  192.   else
  193.     puppetsound 3,"mousedn"
  194.     
  195.     if IsQTVRMovie(gQTVRObj) then 
  196.       getview
  197.       closemovie
  198.     else
  199.       puppetsprite 22 false
  200.     end if
  201.   end if 
  202.   
  203.   sendAllSprites(#CDSmallMenuPuppetsOff)
  204.   sendAllSprites(#CDMenuPuppetsOff)
  205.   sendAllSprites(#layoutPuppetsOff)
  206.   deselect menuController
  207.   --  pass
  208. end
  209.  
  210. on oldMouseUp me
  211.   global Fqtvr
  212.   
  213.   --back to QTVR button
  214.   puppetSprite 22, false
  215.   
  216.   resetInfo
  217.   if Fqtvr = "" then
  218.     set Fqtvr="no"  
  219.     sound playfile 1,"instr4"
  220.   end if
  221.   go to "Pexterior"
  222. end
  223.